﻿using System;
using System.Web.Mvc;

using MSAcademic.v2.Web.Areas.Admin.Models.Layout;

namespace MSAcademic.v2.Web.Areas.Admin.Controllers
{
    public partial class LayoutController : Controller
    {
        [ChildActionOnly]
        public PartialViewResult DisplayUserInfo()
        {
            var model = _displayUserInfoModelFactory();

            return PartialView(model);
        }
    }

    public partial class LayoutController
    {
        private readonly Func<DisplayUserInfoModel> _displayUserInfoModelFactory;

        public LayoutController(
            Func<DisplayUserInfoModel> displayUserInfoModelFactory)
        {
            _displayUserInfoModelFactory = displayUserInfoModelFactory;
        }
    }
}
